package com.fuze.domain.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author sepc_
 * @date 5/19/2021 13:42
 * 售电合同表（分成方式）
 */
@ApiModel(value = "com-fuze-domain-model-SharingContract", description = "售电合同表（分成方式）")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "buy_electric.sharing_contract_tab")
public class SharingContract implements Serializable {
    private static final long serialVersionUID = 4687987365650164298L;
    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "自增主键")
    private Integer id;

    /**
     * 购电公司名称
     */
    @TableField(value = "market_members_name")
    @ApiModelProperty(value = "购电公司名称")
    private String marketMembersName;

    /**
     * 售电公司
     */
    @TableField(value = "electricity_sales_company")
    @ApiModelProperty(value = "售电公司")
    private String electricitySalesCompany;

    /**
     * 用户利益分成
     */
    @TableField(value = "profit_sharing_user")
    @ApiModelProperty(value = "用户利益分成")
    private Double profitSharingUser;

    /**
     * 售电公司利益分成
     */
    @TableField(value = "profit_sharing_company")
    @ApiModelProperty(value = "售电公司利益分成")
    private Double profitSharingCompany;

    /**
     * 合同开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "contract_start_date")
    @ApiModelProperty(value = "合同开始日期")
    private Date contractStartDate;

    /**
     * 合同结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "contract_end_date")
    @ApiModelProperty(value = "合同结束日期")
    private Date contractEndDate;

    /**
     * 逻辑删除
     */
    @TableField(value = "deleted")
    private Integer deleted;

    /**
     * 数据创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /**
     * 数据更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    public static final String COL_ID = "id";

    public static final String COL_MARKET_MEMBERS_NAME = "market_members_name";

    public static final String COL_ELECTRICITY_SALES_COMPANY = "electricity_sales_company";

    public static final String COL_PROFIT_SHARING_USER = "profit_sharing_user";

    public static final String COL_PROFIT_SHARING_COMPANY = "profit_sharing_company";

    public static final String COL_CONTRACT_START_DATE = "contract_start_date";

    public static final String COL_CONTRACT_END_DATE = "contract_end_date";
}